<?

session_start();

//鉴权
include_once '../../controller/script/check_session.php';


//载入根目录config设定
include_once($_SERVER['DOCUMENT_ROOT'] . "/config.php");

$nid = $_REQUEST['nid'];

$info = select_one_line_all_items($table_prefix . "asset_data", ' nid =' . $nid);


?>
<style>
    .hesAjb {
        padding: 0 var(--spacing5-v7-11-2);
    }

    .hPbsrj {
        margin-bottom: var(--spacing4-v7-11-2);
    }

    .fYBDkk {
        font-weight: normal;
        font-size: var(--fontSize75-v7-11-2);
        line-height: 20px;
        margin: 0px;
    }

    .lmwTTM {
        --list-item-right-elements-color: var(--ds-list-item-right-elements-color);
        display: flex;
        align-items: center;
        margin-right: calc(var(--spacing4-v7-11-2) * -1);
        margin-left: calc(var(--spacing4-v7-11-2) * -1);
        padding: var(--spacing3-v7-11-2) var(--spacing4-v7-11-2);
        border-radius: var(--ds-list-item-border-radius-override, var(--radiusLarge-v7-11-2));
        color: var(--colorText-v7-11-2);
        outline: none;
        cursor: pointer;
    }

    .ds-dark-theme .ItemStyled-sc-1c1oyq7-0 {
        --ds-list-item-active-background-hover: var(--gray25a-v7-11-2);
        --ds-list-item-active-background-focus: var(--gray25a-v7-11-2);
        --ds-list-item-active-background-active: var(--gray50a-v7-11-2);
        --ds-list-item-right-elements-color: var(--gray200a-v7-11-2);
        --ds-list-item-right-elements-color-active: var(--gray600a-v7-11-2);
        --ds-list-item-focus-ring: inset 0 0 0 2px var(--gray300a-v7-11-2), inset 0 0 0 4px var(--gray50-v7-11-2);
    }

    .gXFiwg {
        flex: 0 0 auto;
        margin-right: var(--spacing4-v7-11-2);
    }

    .fphwCG {
        position: relative;
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
    }

    .kpmkSJ {
        position: absolute;
        top: 0px;
        left: 0px;
        width: 100%;
        height: 100%;
    }

    .gLpbLs {
        position: absolute;
        inset: 0px;
        display: grid;
        place-items: center;
        color: var(--gray600-v7-11-2);
        font-weight: 600;
        font-size: var(--fontSize500-v7-11-2);
        line-height: 1;
    }

    .jhOlmf {
        font-weight: normal;
        font-size: var(--fontSize100-v7-11-2);
        line-height: 20px;
        flex: 1 1 0%;
        min-width: 0px;
    }

    .BqTaT {
        display: block;
        overflow: hidden;
        min-width: 0px;
        text-decoration: none;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #image_enlarger > figure > div.table_wrapper .overlay-detail ul li span {
        position: relative;
    }

    .eTmkwk {
        transform: rotate(180deg);
        transition: 200ms;
        margin-left: auto;
        font-size: 20px;
    }
</style>
<div id="image_enlarger" data-media-name="B&amp;W - CI In-Ceiling - TV Room 2">
    <div class="image-detail-toolbar">
        <a href="javascript:close_box()" class="close tip-trigger"><span class="times">×</span>Close</a>
        <a href="" title="" class="overlay-resize"><i class="fa fa-expand"></i></a>
    </div>
    <a href="#" class="nav left">
        <span class="icon"><i class="fa fa-angle-left"></i></span>
    </a>
    <a href="#" class="nav right">
        <span class="icon"><i class="fa fa-angle-right"></i></span>
    </a>
    <span class="detail-loader left"><span class="icon"><i class="fa fa-spin fa-lg fa-refresh"></i></span></span>
    <span class="detail-loader right"><span class="icon"><i class="fa fa-spin fa-lg fa-refresh"></i></span></span>
    <figure>
        <div class="table_wrapper">
            <div class="cell_wrapper top tif transparent">

                <div class="top_cell_wrapper">


                    <div id="previewImage" class="image-container">

                        <img class="focus-pointer hidden"
                             src="https://d8ejoa1fys2rk.cloudfront.net/5.0.5/includes/img/common/focus-pointer.png"
                             style="position:absolute;transition-duration:0.3s;">


                        <img class="detail-image " src="/uploadfiles/<? echo $info['asset_id'] ?>.jpg">


                    </div>
                    <div class="detail-image-canvas hidden">
                        <div class="canvas-overflow-fix">
                            <div class="detail-image-container">
                                <img src="/files/91139f1e-b196-5a45-81b2-0eb15ad47302?version=a0b1ec4b&amp;account_id=D40883B6-2C47-4C78-BCF8D0236F399C06&amp;signature=axJFb%2FJh5r5iPPdGBCMYCrsutwhTLoNPxu4hYvuSnesizSVj%2B7ZnTw2rI5R79GV6O9QfBjzSbW3%2BEFKSyoPpBw%3D%3D&amp;expiry=1750550400000"
                                     alt="B&amp;W - CI In-Ceiling - TV Room 2">
                            </div>
                        </div>
                    </div>

                </div>


            </div>

            <div class="overlay-detail">
                <div class="select"></div>
                <nav>
                    <ul>
                        <li id="info-tab" class="active">

                            <a href="#" data-link="/media/info/58D0551B-0A31-4049-B169F964510CEBE6/" class="btn-tab"
                               data-tab="info">
                                <i class="fa fa-lg fa-info-circle"></i><br>Info
                            </a>

                        </li>


                    </ul>
                </nav>
                <div class="overlay-detail-content">

                        <ul class="media-info">
                            <li data-name="title">
                                <div class="control-group">
                                    <div class="controls">

                                        <h2><? echo $info['title'] ?></h2>

                                    </div>
                                </div>
                            </li>


                            <li data-name="description">

                            </li>


                            <div id="rootImageGen" ></div>


                            <li data-name="datePublished">
                                <b>Date published</b>
                                <time>

                                    <? echo $info['published_date'] ?>

                                </time>
                            </li>


                            <li data-name="generalAddedOn">
                                <b>Date added</b>
                                <time>
                                    <? echo $info['creation_date'] ?>

                                </time>
                            </li>


<!--                            <li data-name="originaleFilename">-->
<!--                                <b>Original filename</b>-->
<!--                                <span class="word-break">B&amp;W - CI In-Ceiling - TV Room 2.tif</span>-->
<!--                            </li>-->


                            <li data-name="generalAddedBy">
                                <b>Added by</b>

                                    <i class="icon-small-user"></i>                                    <? echo $info['created_by'] ?>


                            </li>

                            <li data-name="Brand">
                                <b>Brand</b>

                                <div class="mainDisplayFilter">


                                    <ul>


                                        <li data-selected="true" data-name="bowers_wilkins">

                                            <i class="fa fa-check-square-o"></i>

                                            <span style="font-weight:bold;">

                    <? echo $info['brand'] ?>

            </span>


                                        </li>

                                    </ul>


                                </div>

                            </li>


                            <li data-name="Region">
                                <b>Region</b>


                                <div class="mainDisplayFilter">


                                    <ul>


                                        <li data-selected="true" data-name="AsiaPacific">

                                            <i class="fa fa-check-square-o"></i>

                                            <span style="font-weight:bold;">
                                                        <? echo $info['region'] ?>

            </span>


                                        </li>


                                    </ul>


                                </div>

                            </li>


                            <li data-name="File Type">
                                <b>File Type</b>
                                <? echo $info['file_type'] ?>


                            </li>


                            <li data-name="Asset Type">
                                <b>Asset Type</b>


                                <div class="mainDisplayFilter">


                                    <ul>


                                        <li data-selected="true" data-name="Photography">

                                            <i class="fa fa-check-square-o"></i>

                                            <span style="font-weight:bold;">
                                                        <? echo $info['asset_type'] ?>

            </span>


                                        </li>

                                    </ul>


                                </div>

                            </li>





                            <li data-name="Product Category">
                                <b>Product Category</b>


                                <div class="mainDisplayFilter">


                                    <ul>


                                        <li data-selected="true" data-name="Custom_Installation">

                                            <i class="fa fa-check-square-o"></i>

                                            <span style="font-weight:bold;">

                     <? echo $info['product_category'] ?>

            </span>


                                        </li>

                                    </ul>


                                </div>

                            </li>


                            <li data-name="Product Range">
                                <b>Product Range</b>


                                <div class="mainDisplayFilter">


                                    <ul>


                                        <li data-selected="true" data-name="In_Ceiling">

                                            <i class="fa fa-check-square-o"></i>

                                            <span style="font-weight:bold;">

                    <? echo $info['product_range'] ?>

            </span>


                                        </li>

                                    </ul>


                                </div>

                            </li>


                            <li data-name="Product">
                                <b>Product</b>


                                <div class="mainDisplayFilter">


                                    <ul>

                                        <? $lightbox_product_list=explode(",",$info['product']) ?>
                                        <?foreach ($lightbox_product_list as $lightbox_product_list_item){?>
                                        <li data-selected="true" data-name="CCM362">
                                            <i class="fa fa-check-square-o"></i>
                                            <span style="font-weight:bold;">
                                                <span>
                                                     <? echo $lightbox_product_list_item ?>
                                                </span>
                                            </span>
                                        </li>
                                        <?;}?>

                                    </ul>


                                </div>

                            </li>


                            <br>

                            <div id="collectionInAssets">
                                <li class="ListItem-sc-1vue3kf-0 esHeHK">
                                    <a class="ListHeader-sc-1vue3kf-3 iDBFQW">
                                        <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"
                                             width="15px" height="15px"
                                             style="vertical-align: middle; margin: auto 7px auto 0px; line-height: 35px; align-self: center;"
                                             aria-hidden="true">
                                            <path fill="currentColor" fill-rule="evenodd"
                                                  d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2Zm-11-4 2.03 2.71L16 11l4 5H8l3-4Zm-9 8V6h2v14h14v2H4c-1.1 0-2-.9-2-2Z"
                                                  clip-rule="evenodd"></path>
                                        </svg>
                                        Collections
                                    </a>
                                    <div class="ds-dark-theme">

                                        <div class="ListStyled-sc-kyt0j-0 hesAjb">

                                            <div tabindex="0"
                                                 class="ItemStyled-sc-1c1oyq7-0 lmwTTM ds-checkbox__pointer-events-wrapper ds-switch__pointer-events-wrapper ds-thumbnail__pointer-events-wrapper">
                                                <div class="ThumbnailContainer-sc-1c1oyq7-2 gXFiwg">
                                                    <div class="ThumbnailContainer-sc-humdc6-0 fphwCG ds-thumbnail__pointer-events-wrapper"
                                                         style="--ds-thumbnail-border-radius: 5px;">
                                                        <svg role="none" class="Svg-sc-humdc6-1 kpmkSJ">
                                                            <mask id="thumbnail-mask-weHUwaHiBYQco5mJYNPsR">
                                                                <rect fill="white" x="0" y="0" width="100%"
                                                                      height="100%" rx="5px"></rect>
                                                                <circle class="Cutout-sc-humdc6-2 dWPXgo"></circle>
                                                            </mask>
                                                            <g mask="url(#thumbnail-mask-weHUwaHiBYQco5mJYNPsR)">
                                                                <rect fill="var(--gray50a-v7-11-2)" x="0" y="0"
                                                                      width="100%" height="100%" rx="5px"
                                                                      data-testid="ds-thumbnail-fill"></rect>
                                                            </g>
                                                        </svg>
                                                        <div data-testid="ds-thumbnail-content"
                                                             class="Content-sc-humdc6-3 gLpbLs">
                                                            <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"
                                                                 viewBox="0 0 24 24" width="24px" height="24px"
                                                                 style="vertical-align: middle;" aria-hidden="true">
                                                                <path fill="currentColor"
                                                                      d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"></path>
                                                            </svg>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div id="list-item-label-oiC3pVOBvokiyt07gQR94"
                                                     class="Content-sc-1c1oyq7-3 jhOlmf"
                                                     onclick="add_collection(<?php echo $nid; ?>)">
                                                    <span class="StyledText-sc-b6pp4c-0 BqTaT">Add to collection</span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </div>


                        </ul>
                        <div class="bottom-container">


                            <div class="download bottom media-downloads" id="downloadAll">

                                <?php
                                if ($info['filename'] != NULL) {
                                    ?>
                                    <a href="/uploadfiles/<? echo $info['filename']; ?>" class="action-btn blue block">
                                        <i class="fa fa-download"></i> Download all files
                                    </a>

                                    <?php
                                }
                                ?>

                            </div>
                            
                        </div>

                </div>
            </div>
        </div>
    </figure>


</div>